package com.lishao.soccer.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import com.lishao.soccer.bean.entity.SmUser;
import com.lishao.soccer.bean.entity.TmGameArrive;
import com.lishao.soccer.bean.entity.TmGameJudge;
import com.lishao.soccer.bean.entity.TmGameScore;
import com.lishao.soccer.bean.entity.TmGameSignup;
import com.lishao.soccer.bean.entity.TmGameTech;
import com.lishao.soccer.bean.entity.TmTeamGame;
import com.lishao.soccer.bean.entity.TmTeamPlace;
import com.lishao.soccer.bean.form.TmTeamGameForm;
import com.lishao.system.security.providers.SecurityUser;

public interface TmTeamGameService {
	public List <TmTeamGame> selectByTeam(Long teamId,Long userId);
	public TmTeamGame selectTeamGameById(Long tmGameId);
	public TmGameSignup selectGameSignup(Long teamId,Long tmGameId,Long signupUserId);
	public List<TmGameSignup> selectGameSignup(Long teamId,Long tmGameId);
	public void gameSignUp(TmGameSignup tmGameSignup);
	public TmTeamPlace getTeamPlace(Long placeId);
	public List<TmTeamPlace> selectPlaceByTeamId(Long teamId);
	public void gameKq(TmGameArrive tmGameArrive,HttpSession session);
	public List<TmGameTech> selectForGameTech(Long teamId,Long tmGameId,Long userId);
	public void gameTechSubmit(Long teamId,Long tmGameId,SecurityUser secUser,List<TmGameTech> gameTechList);
	public boolean saveGame(TmTeamGameForm tmTeamGameForm,SmUser smUser);
	public TmTeamGame findGame(Long tmGameId);
	public List<TmGameJudge> selectForJudgeAssign(Long teamId,Long tmGameId);
	//添加到场人员查询
	public List<TmGameJudge> selectForAddarrived(Long teamId,Long tmGameId);
	public void gameJudgeAssignSubmit(Integer ourScore,Integer oppScore,Long teamId, Long tmGameId, SecurityUser secUser,List<TmGameJudge> gameJudgeList);
	//添加到场人员
	public void addArriveList(Long teamId, Long tmGameId, SecurityUser secUser,List<TmGameJudge> gameJudgeList);
	//查询活动状态的比赛
	public List <TmTeamGame> selectActiveGameByTeam(Long teamId,Long userId);
	//查询已取消、已终止的比赛
    public List <TmTeamGame> selectInActiveGameByTeam(Long teamId,Long userId);
    //查询已成功签到的记录
    List<TmGameArrive> selectSuccessArriveRecord(Long teamId,Long tmGameId,Long userId);
    //判断是否成功签到
    public boolean checkArriveRecord(Long teamId,Long tmGameId,Long userId);
    //查询得分
    public List<TmGameScore> selectGameScore(Long teamId,Long tmGameId);
    public int deleteArriveDataByGameUser(Long teamId,Long tmGameId,Long arriveUserId);
}
